package lesson4;

import java.util.Scanner;

public class ArrayExamples {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		int n;
		do
		{
			n = s.nextInt();
		}
		while(n <= 0);
		
		int[] myArray = new int[n];
		

		for(int i = 0; i < myArray.length; i++)
		{
			System.out.println("Enter a value for " + (i+1) + " element of array");
			myArray[i] = s.nextInt();
		}
		
		for(int i = 0; i < myArray.length; i++)
		{
			System.out.print(myArray[i] + " ");
		}
		
		//input array length - n
		//create array with n elements
		//input value for each element in the array
		//print the array
		
	}
}
